CC=gcc
CFLAGS= -Wall -O2 `pkg-config --libs --cflags gtk+-2.0` \
		`mysql_config --cflags --libs`
LINK=
object=read
OBJ= main.o  \
callbacks.o     \
interface.o \
support.o  \
cabout.o \
iabout.o \
ihelp.o\
chelp.o\
message.o

HEADER= callbacks.h \
interface.h        \
support.h  \
debug.h   \
about.h \
help.h\
message.h


$(object):$(OBJ)
	$(CC) $(CFLAGS) $(OBJ)  -o $(object) $(LINK)
callbacks.o :  callbacks.c    $(HEADER)
	$(CC) $(CFLAGS) -c $<   -o $@  
iabout.o :  iabout.c    $(HEADER)
	$(CC) $(CFLAGS) -c $<   -o $@  
ihelp.o :  ihelp.c    $(HEADER)
	$(CC) $(CFLAGS) -c $<   -o $@  
chelp.o :  chelp.c    $(HEADER)
	$(CC) $(CFLAGS) -c $<   -o $@  
cabout.o :  cabout.c    $(HEADER)
	$(CC) $(CFLAGS) -c $<   -o $@ 
message.o :  message.c    $(HEADER)
	$(CC) $(CFLAGS) -c $<   -o $@ 
interface.o :  interface.c    $(HEADER)
	$(CC) $(CFLAGS) -c $<   -o $@  
support.o :  support.c    $(HEADER)
	$(CC) $(CFLAGS) -c $<   -o $@  
main.o :  main.c    $(HEADER)
	$(CC) $(CFLAGS) -c $<   -o $@  
clean:
	rm -f *.o
	@if [ -e $(object) ]; \
	then \
		echo "rm $(object)" ;\
		rm $(object) ; \
	fi
